<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<meta name="author" content="yinq">
<title>登录 - {:$configs['SYSTEM_NAME']}</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/animate.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/style.min.css">
<style>
.signin-form .has-feedback {
    position: relative;
}
.signin-form .has-feedback .form-control {
    padding-left: 36px;
}
.signin-form .has-feedback .mdi {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    width: 36px;
    height: 36px;
    line-height: 36px;
    z-index: 4;
    color: #dcdcdc;
    display: block;
    text-align: center;
    pointer-events: none;
}
.signin-form .has-feedback.row .mdi {
    left: 15px;
}
</style>
</head>

<body class="center-vh" style="background-image: url(__STATIC__/admin/images/login-bg-2.jpg); background-size: cover;">
<div class="card card-shadowed p-5 mb-0 mr-2 ml-2" style="min-width:485px;">
  <div class="text-center mb-3">
    <a href="index.html"> <img alt="light year admin" src="__STATIC__/admin/images/logo-sidebar.png"> </a>
  </div>

  <form action="{:url('mloginCheck')}" method="post" class="signin-form needs-validation" novalidate>
    
    <input type="hidden" name="account" value="{:$account}" />

    <div class="mb-3 has-feedback">
      <span class="mdi mdi-account" aria-hidden="true"></span>
      <input type="text" placeholder="请输入您的手机号" class="form-control" name="mobile" id="mobile" readonly value="{:$mobile}" />
    </div>

    
    <div class="mb-3 has-feedback row">
      <div class="col-7">
        <span class="mdi mdi-check-all form-control-feedback" aria-hidden="true"></span>
        <input type="text" name="verify" class="form-control" placeholder="验证码">
      </div>
      <div class="col-5 text-right">
        <a class="btn btn-block btn-primary" id="smsBtn" href="javascript:void(0)" onclick="sendSms()" style="width:100%;">获取验证码</a>
      </div>
    </div>

    <!-- <div class="mb-3">
      <div class="form-check">
        <input type="checkbox" class="form-check-input" id="rememberme">
        <label class="form-check-label not-user-select" for="rememberme">5天内自动登录</label>
      </div>
    </div> -->

    <div class="mb-3 d-grid">
      <button class="btn btn-primary" type="submit">立即登录</button>
    </div>
  </form>
  
  <p class="text-center text-muted mb-0">Copyright © 2025 <a target="_blank" href="{:$configs['SYSTEM_URL']}">{:$configs['SYSTEM_NAME']}</a>. ICP备案：<a target="_blank" href="{:$configs['BEIAN_URL']}">{:$configs['BEIAN_NUM']}</a></p>
</div>

<script type="text/javascript" src="__STATIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/popper.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/lyear-loading.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap-notify.min.js"></script>
<script type="text/javascript">
    var cchint = null;
    function sendSms(){
        $.ajax({
            url:'{:url('getLoginSms')}',
            data:{mobile:$("#mobile").val()},
            type:'post',
            dataType:'json',
            success:function(data){
                if (data.code == 1) {
                    $("#smsBtn").removeClass('btn-primary');
                    $("#smsBtn").addClass('btn-secondary');
                    $("#smsBtn").html('60');
                    $("#smsBtn").attr('onclick','');
                    cchint = setInterval(function(){

                        var num = $("#smsBtn").html();
                        console.log(num);
                        num--;
                        if (num <= 0) {
                            $("#smsBtn").removeClass('btn-secondary');
                            $("#smsBtn").addClass('btn-primary');
                            $("#smsBtn").html('获取验证码');
                            $("#smsBtn").attr('onclick','sendSms()');
                            clearInterval(cchint);
                        }else{
                            $("#smsBtn").html(num);
                        }
                    },1000);
                }else{
                    alert(data.msg);
                }
            }
        });
    }

</script>
</body>
</html>